/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.setting.Constant;
import com.smg.community.setting.ProjectSetting;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgGroup extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgGroup";
	public static final String ALIAS_GROUP_ID = "groupId";
	public static final String ALIAS_FK_CATE_ID = "fkCateId";
	public static final String ALIAS_CATE_NAME = "cateName";
	public static final String ALIAS_FK_MEMBER_ID = "fkMemberId";
	public static final String ALIAS_MEMBER_NAME = "memberName";
	public static final String ALIAS_MEMBER_HEAD_IMAGE = "memberHeadImage";
	public static final String ALIAS_GROUP_NAME = "groupName";
	public static final String ALIAS_GROUP_DESC = "groupDesc";
	public static final String ALIAS_MEMBER_COUNT = "memberCount";
	public static final String ALIAS_TOTAL_TOPIC_COUNT = "totalTopicCount";
	public static final String ALIAS_TODAY_TOPIC_COUNT = "todayTopicCount";
	public static final String ALIAS_TODAY_MEMBER_COUNT = "todayMemberCount";
	public static final String ALIAS_TOTAL_CLICKS = "totalClicks";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * groupId       db_column: groupId 
     */	
	
	private java.lang.Integer groupId;
    /**
     * fkCateId       db_column: fkCateId 
     */	
	private java.lang.Integer fkCateId;
    /**
     * cateName       db_column: cateName 
     */	
	private java.lang.String cateName;
    /**
     * fkMemberId       db_column: fkMemberId 
     */	
	private java.lang.Integer fkMemberId;
    /**
     * memberName       db_column: memberName 
     */	
	private java.lang.String memberName;
    /**
     * memberHeadImage       db_column: memberHeadImage 
     */	
	private java.lang.String memberHeadImage;
    /**
     * groupName       db_column: groupName 
     */	
	private java.lang.String groupName;
    /**
     * groupDesc       db_column: groupDesc 
     */	
	private java.lang.String groupDesc;
    /**
     * memberCount       db_column: memberCount 
     */	
	private java.lang.Integer memberCount;
    /**
     * totalTopicCount       db_column: totalTopicCount 
     */	
	private java.lang.Integer totalTopicCount;
    /**
     * todayTopicCount       db_column: todayTopicCount 
     */	
	private java.lang.Integer todayTopicCount;
    /**
     * todayMemberCount       db_column: todayMemberCount 
     */	
	private java.lang.Integer todayMemberCount;
    /**
     * totalClicks       db_column: totalClicks 
     */	
	private java.lang.Float totalClicks;
	//columns END
	
	private Date createDate;
	
	private int cityNo;
	
	private String cityName;

	public int getCityNo() {
		return cityNo;
	}

	public void setCityNo(int cityNo) {
		this.cityNo = cityNo;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	private String image;
	public String getImage() {
		if ( image == null || image.trim().equals("") )
			 image =  "http://img3.ddmapimg.com/crm//2013-04-26/225831802.jpg";
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public SmgGroup(){
	}

	public SmgGroup(
		java.lang.Integer groupId
	){
		this.groupId = groupId;
	}

	public void setGroupId(java.lang.Integer value) {
		this.groupId = value;
	}
	
	public java.lang.Integer getGroupId() {
		return this.groupId;
	}
	public void setFkCateId(java.lang.Integer value) {
		this.fkCateId = value;
	}
	
	public java.lang.Integer getFkCateId() {
		return this.fkCateId;
	}
	public void setCateName(java.lang.String value) {
		this.cateName = value;
	}
	
	public java.lang.String getCateName() {
		return this.cateName;
	}
	public void setFkMemberId(java.lang.Integer value) {
		this.fkMemberId = value;
	}
	
	public java.lang.Integer getFkMemberId() {
		return this.fkMemberId;
	}
	public void setMemberName(java.lang.String value) {
		this.memberName = value;
	}
	
	public java.lang.String getMemberName() {
		return this.memberName;
	}
	public void setMemberHeadImage(java.lang.String value) {
		this.memberHeadImage = value;
	}
	
	public java.lang.String getMemberHeadImage() {
		if  ( memberHeadImage == null || memberHeadImage.trim().equals("")){
			memberHeadImage = "http://img3.ddmapimg.com/crm/2013-04-26/224956577.jpg";
		}
		return this.memberHeadImage;
	}
	public void setGroupName(java.lang.String value) {
		this.groupName = value;
	}
	
	public java.lang.String getGroupName() {
		return this.groupName;
	}
	public void setGroupDesc(java.lang.String value) {
		this.groupDesc = value;
	}
	
	public java.lang.String getGroupDesc() {
		return this.groupDesc;
	}
	public void setMemberCount(java.lang.Integer value) {
		this.memberCount = value;
	}
	
	public java.lang.Integer getMemberCount() {
		return this.memberCount;
	}
	public void setTotalTopicCount(java.lang.Integer value) {
		this.totalTopicCount = value;
	}
	
	public java.lang.Integer getTotalTopicCount() {
		return this.totalTopicCount;
	}
	public void setTodayTopicCount(java.lang.Integer value) {
		this.todayTopicCount = value;
	}
	
	public java.lang.Integer getTodayTopicCount() {
		return this.todayTopicCount;
	}
	public void setTodayMemberCount(java.lang.Integer value) {
		this.todayMemberCount = value;
	}
	
	public java.lang.Integer getTodayMemberCount() {
		return this.todayMemberCount;
	}
	public void setTotalClicks(java.lang.Float value) {
		this.totalClicks = value;
	}
	
	public java.lang.Float getTotalClicks() {
		return this.totalClicks;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("GroupId",getGroupId())
			.append("FkCateId",getFkCateId())
			.append("CateName",getCateName())
			.append("FkMemberId",getFkMemberId())
			.append("MemberName",getMemberName())
			.append("MemberHeadImage",getMemberHeadImage())
			.append("GroupName",getGroupName())
			.append("GroupDesc",getGroupDesc())
			.append("MemberCount",getMemberCount())
			.append("TotalTopicCount",getTotalTopicCount())
			.append("TodayTopicCount",getTodayTopicCount())
			.append("TodayMemberCount",getTodayMemberCount())
			.append("TotalClicks",getTotalClicks())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getGroupId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgGroup == false) return false;
		if(this == obj) return true;
		SmgGroup other = (SmgGroup)obj;
		return new EqualsBuilder()
			.append(getGroupId(),other.getGroupId())
			.isEquals();
	}
}

